@import '../styles/header.scss';
@import '../styles/common.scss';
@import '../styles/icon.scss';
@import '../styles/main.scss';
@import '../styles/nav.scss';

@font-face {
  font-family: 'font-viser';  /* project id 807564 */
  src: url('//at.alicdn.com/t/font_807564_prqm62fshd8.eot');
  src: url('//at.alicdn.com/t/font_807564_prqm62fshd8.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_807564_prqm62fshd8.woff') format('woff'),
  url('//at.alicdn.com/t/font_807564_prqm62fshd8.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_807564_prqm62fshd8.svg#iconfont') format('svg');
}
@keyframes wave{
  0%{
    opacity: 0;
  }
  50%{
    opacity: 1;
  }
  100%{
    opacity: 0;
  }
}

#main-content {
  #mount iframe{
    width:100%;
    height:100%;
    border:0;
    padding:0;
    margin:0;
  }
  .icon-viser{
    font-family: 'font-viser';
    display: inline-block;
    font-size:16px;font-style:normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0.2px;
    -moz-osx-font-smoothing: grayscale;
  }
  .case-type {
    background: #fff;
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
    text-transform: capitalize;
    width: calc(100% - 460px);
    position: absolute;
  }

  .op {
    position: absolute;
    top: 0;
    right: 15px;
    z-index: 11;
    line-height: 28px;
    color: #666;

    a {
      cursor: pointer;
      margin-top: 3px;
      padding: 3px 16px;
      display: inline-block;
      background: $primary;
      border-radius: 4px;
      font-size: 14px;
      line-height: 22px;
      color: #fff;
      i {
        font-size: 14px;
        line-height: 22px;
        color: #fff;
      }
    }
  }

  .case-demo {
    padding: 50px 15px 0 0;
    width: calc(100% - 430px);
    border-right: 1px dashed #eee;

    .case-demo-item {
      position: absolute;
      width: 100%;
      height: 100%;
    }
  }
  .case-code {
    padding-left: 15px;
    width: 415px;
  }

  .case-demo,
  .case-code {
    display: inline-block;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
  }
  .case-code-topbar{
    color:#999;
    padding: 10px 14px 10px 10px;
    font-size:14px;
    border-bottom: 1px solid rgba(0,0,0,.1);
    .case-btn-cont{
      float:right;
      .case-tip{
        color: #28a745;
        opacity: 0;
        animation:wave ease 1.5s;
        -webkit-animation:wave ease 1.5s;
        &.err{
          color:#f00;
        }
      }
      .case-btn{
        cursor: pointer;
        margin-left: 5px;
        user-select: none;
        &:hover{
          color:#40A9FE;
        }
      }
    }
  }
  .case-code-detail {
    display: block;
    height: calc(100% - 40px);
    width: 100%;
  }

  .case-code-switch {
    height: 40px;
    width: 100%;
    display: block;
    position: relative;
    box-sizing: border-box;

    .case-code-switch-item {
      float: left;
      display: block;
      width: 80px;
      margin: 0 10px;
      font-size: 14px;
      height: 28px;
      text-align: center;
      padding-bottom: 2px;
      color: #999;
      cursor: pointer;

      &:hover {
        color: #666;
      }

      &.active, &.active:hover {
        color: $primary;
        padding-bottom: 0;
        border-bottom: 2px solid $primary;
      }
    }
  }
  .case-box.no-code {
    padding: 15px;
  }
}
